// ++++++++++++++++++++++++++++++++++++++++
// 《零基础Go语言算法实战》源码
// ++++++++++++++++++++++++++++++++++++++++
// Author:廖显东（ShirDon）
// Blog:https://www.shirdon.com/
// Gitee:https://gitee.com/shirdonl/goAlgorithms.git
// Buy link :https://item.jd.com/14101229.html
// ++++++++++++++++++++++++++++++++++++++++

package main

import (
	"fmt"
)

type Animal interface {
	Call(string) string
}

type Cat struct{}

func (cat *Cat) Call(sound string) (barking string) {
	if sound == "dog barking" {
		barking = "woof"
	} else {
		barking = "meow"
	}
	return
}

func main() {
	var a Animal = Cat{}
	sound := "meow"
	fmt.Println(a.Call(sound))
}
